package cn.edu.nit.sys.mapper;

import cn.edu.nit.sys.entity.Employee;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @Author xiaobai
 * @Date 2022/9/26 21:33
 * @Version 1.0.0
 */
@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {

    // 获取所有员工
    Page<Employee> getList(Page<Employee> page, String name, Integer type);

    @Select("select id, name from sys_employee_type")
    List<Map<Object, Object>> getType();

    @Select("select id, name from sys_employee where type_code = 3")
    List<Map<Object, Object>> getEmpByType();
}
